From 88d07de868419224898508852e0c2553aa8d2e40 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Thu, 29 Jan 2015 13:42:20 +0000 Subject: [PATCH] x86/shadow: adjust mask shadow_audit_tables() passes to hash_foreach() It so far having been ~1 made most of the code preceding the call pointless, but I assume this wasn't meant to be that way. Also replace the remaining hard coded ~1 with an expression documenting the intention a little better. Signed-off-by: Jan Beulich Adjust again to use SHF_page_type_mask, at Jan's suggestion. Signed-off-by: Tim Deegan --- xen/arch/x86/mm/shadow/common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/mm/shadow/common.c b/xen/arch/x86/mm/shadow/common.c index 7e6aeeb2c3..64c5a28394 100644 --- a/xen/arch/x86/mm/shadow/common.c +++ b/xen/arch/x86/mm/shadow/common.c @@ -3761,7 +3761,7 @@ void shadow_audit_tables(struct vcpu *v) #endif if ( SHADOW_AUDIT & SHADOW_AUDIT_ENTRIES_FULL ) - mask = ~1; /* Audit every table in the system */ + mask = SHF_page_type_mask; /* Audit every table in the system */ else { /* Audit only the current mode's tables */ @@ -3776,7 +3776,7 @@ void shadow_audit_tables(struct vcpu *v) } } - hash_foreach(v, ~1, callbacks, _mfn(INVALID_MFN)); + hash_foreach(v, mask, callbacks, _mfn(INVALID_MFN)); } #endif /* Shadow audit */ -- 2.30.2